-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scaling to include waiting jobs #17
Conversation
fad2399
to
0b61903
Compare
Any thoughts on this one @etaoins? |
Interesting, I hadn't considered including waiting jobs. I'm assuming this is off by default because some of the running agents would be free by the time the waiting jobs were unblocked so this would overscale? I wonder if a better default-on heuristic would be: count := metrics.ScheduledJobs + max(metrics.RunningJobs, metrics.WaitingJobs) That way we would only scale up to account for waiting jobs if they exceeded the number of running jobs, i.e. once they're unblocked we won't have enough agents to run them. I don't feel too strongly about this, just throwing it out there 😄 |
Yeah, it's a reasonably new idea for me too. Basically we see lots of pipelines in the form of It's a good point about some agents freeing up by the time Really appreciate your feedback and insights on the last few PR's @etaoins. |
No worries, it's good to work with a company that takes open source seriously and I have a vested interest in my builds going faster 😉 Another pattern a see a lot at SEEK is steps:
- label: 'Build & Test'
queue: prod
- wait
- label: 'Deploy Dev'
queue: dev
- wait
- label: 'Deploy Prod'
queue: prod
Because most of our e.g. branch builds happen in the |
Yup! |
The agent metrics api now includes a metric for
WaitingJobCount
which tracks jobs that are behind a wait step. This allows for pre-emptive scaling so that instances are ready by the time that jobs are scheduled.By default
waiting
jobs aren't included, but they can be enabled withINCLUDE_WAITING=1
in the lambda env.